import { useLocation } from "react-router-dom";
import queryString from "query-string";

function useQuery<T>() {
  const location = useLocation();
  return queryString.parse(location.search) as T;
}

export default useQuery;
